package com.exam.hibuy.controller;

import com.exam.hibuy.model.User;
import com.exam.hibuy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Created by admin on 2017/12/1.
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/list" , method = RequestMethod.POST)
    public List<User> findUsers(){

//        List<User> users =
        return userService.findUsers();
    }
}
